﻿<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN"    "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html  xmlns="http://www.w3.org/1999/xhtml"  height="100%">
<!--
版本记录：
1.1 更新了变量的命名，使其更精减 
1.2 更新了点击“帮助”后的返回功能
1.3 更新了如果不支持js就会自动显示静态化的链接
1.4 更新帮助列变成第四行，搜索框的控制，max-width用js来实现即可
1.5 更新搜索框显示时第一列变形，解决方案，将"MP3"改成"音乐"
1.6 更新JSON的优化，只按需处理；
1.7 更新取消底部JS控制外观
1.8 删除_width,_height的处理
2.0 更新完成页面底部的待办事项的处理，同时正式签入SVN
2.1 更新排版
2.3 修正搜索的BUG，自动清空关键词
2.4 优化调整JSON的最后一个逗号
2.5 帮助点击后返回的BUG修复
2.6 删除不必要的meta标签
-->
<head>
    <meta http-equiv="Cache-Control" content="private" />
    <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
    <title>极品娃一键导航</title>
    <style>
        *{margin: 0 auto;}
        html, body {margin: 0px auto;height: 100%;}
        table{cellpadding:0;width:100%;height:100%;text-align: center;background-color:#E6F1F5;}
        tr{ height:20%;}
        th, td{background-color:White;border: 1px solid #000;}
        #b0{background-color: #E6F1F5;}
        a{color:Blue;text-decoration: none;}
        a:hover{color: #f60;text-decoration: underline;}		
		#B td{border-style:solid;background-color:#E6F1F5;color:#666666;}
		#B a{color:#666666;}			
    </style>
    <script>
        function K(e) { //键盘捕获事件 //#EBF1F8  F2F2F2
            var k = window.event ? window.event.keyCode : e.which;
            if (k == 37 || (event.shiftKey && k == 51)) {
                D();
                return;
            }
            if (k > 47 && k < 58) {
                if (k == 48) { S(); return; }
                var t = $("i" + k).href == "javascript:void(0);";
                if (document.all) {
                    if (t) {
                        $("i" + k).click();
                    }
                    else {
                        window.location.href = $("i" + k).href;
                    }
                } else {
                    if (t) {
                        var et = document.createEvent("MouseEvents");
                        et.initEvent("click", true, true);
                        $("i" + k).dispatchEvent(et);
                    }
                    else {
                        window.location.href = $("i" + k).href;
                    }
                }
            }
        }
        document.onkeydown = K;
        window.onload = D;
        var N = { L: //默认一级分类
            [
            {a:"常用",t:"1",i:"n1"},
            {a:"下载",t:"1",i:"n11"},
            {a:"文学",t:"1",i:"n12"},
            {a:"邮箱",t:"1",i:"n13"},
            {a:"新闻",t:"1",i:"n14"},
            {a:"交友",t:"1",i:"n15"},
            {a:"工具<br/>查询",t:"1",i:"n16"},
            {a:"购物<br/>休闲",t:"1",i:"n17"},
            {a:"空间<br/>微博",t:"1",i:"n18" }
            ]
        };
        var n1 = { L: //对应的t=1的json数据，它是2到N级分类，均以单独的json对象出现
            [
            {a:"新浪",h:"3g.sina.com.cn"},
            {a:"搜狐",h:"wap.sohu.com"},
            {a:"3G",h:"m.3g.cn"},
            {a:"人人",h:"m.renren.com"},
            {a:"开心",h:"wap.kaixin001.com"},
            {a:"QQ",h:"wfinfo.3g.qq.com"},
            {a:"百度",h:"m.baidu.com"},
            {a:"泡泡",h:"3gd.pp.cn"},
            {a:"淘宝",h:"m.taobao.com" }
            ]
        };
        var n11 = { L:
            [
            {a:"宝软",h:"baoruan.com"},
            {a:"泡椒",h:"paojiao.cn"},
            {a:"360",h:"wap.360.cn"},
            {a:"天网",h:"wap.waptw.com"},
            {a:"QQ",h:"mobile.qq.com"},
            {a:"3G",h:"download8.3g.cn/index.aspx?cin=4"},
            {a:"手机<br/>之家",h:"17wap.com"},
            {a:"3G<br/>娃娃",h:"3g.3gwawa.net"},
            {a:"百度<br/>软件",h:"wap.skycn.com/?app=1"}
            ]
        };
        var n12 = { L:
            [
            {a:"宜搜",h:"b.easou.com"},
            {a:"红袖",h:"hongxiu.cn"},
            {a:"晋江",h:"wap.jjwxc.net"},
            {a:"17K",h:"m.17k.com"},
            {a:"飞库",h:"wap.feiku.com"},
            {a:"起点",h:"wap.qidian.com"},
			{a:"新浪<br/>读书",h:"3g.sina.com.cn/3g/book"},
            {a:"掌上<br/>书院",h:"wap.mbook.com.cn"},
            {a:"3G<br/>书城",h:"book.3g.cn"}
            ]
        };
        var n13 = { L:
            [
            {a:"3G",h:"wap.mail.3g.cn"},
            {a:"Gmail",h:"gmail.com"},
            {a:"139",h:"wapmail.139.com"},
            {a:"联通",h:"wapmail.wo.com.cn"},
            {a:"新浪",h:"3g.sina.com.cn/prog/wapsite/wapmail/logon.php"},
            {a:"雅虎",h:"mail.cn.yahoo.com"},
            {a:"搜狐",h:"wap.mail.sohu.com"},
            {a:"网易",h:"pda.163.com/wap.wml"},
            {a:"QQ",h:"mail.3g.qq.com"}
            ]
        };
        var n14 = { L:
            [
            {a:"环球",h:"wap.huanqiu.com"},
            {a:"央视",h:"wap.cctv.com"},
            {a:"3G",h:"news2.3g.cn"},
            {a:"搜狐",h:"wap.sohu.com/news"},
            {a:"凤凰",h:"i.ifeng.com/news/newsi?mid=5LgBMV&vt=2"},
            {a:"羊城",h:"3g.pp.cn/ch/new/index.jsp",t:"0"},
            {a:"新华",h:"m.news.cn"},
            {a:"新浪",h:"3g.sina.com.cn/nc.php?vt=1&amp;pos=1"},
            {a:"网易",h:"3g.163.com/news"}
            ]
        };
        var n15 = { L:
            [
            {a:"拇指",h:"wap.mztk.com"},
            {a:"爱情",h:"wap.ipart.cn"},
            {a:"天下",h:"tx.com.cn/chat/index.do"},
            {a:"亿聚",h:"3g.yeejee.com"},
            {a:"51",h:"wap.51.com"},
            {a:"世纪",h:"wap.jiayuan.com"},
            {a:"百合",h:"wap.heiyou.com"},
            {a:"人人",h:"wap.renren.com"},
            {a:"开心",h:"wap.kaixin001.com"}
            ]
        };
        var n16 = { L:
            [
            {a:"航班",h:"wap.qunar.com"},
            {a:"火车",h:"wap.huochepiao.com"},
            {a:"公交",h:"wap.8684.cn/bus.php"},
            {a:"翻译",h:"translate.google.com/m/translate"},
            {a:"手机",h:"wap.ip138.com/sim.wml"},
            {a:"快递",h:"wap.kuaidi100.com"},
            {a:"地图",h:"wapmap.baidu.com"},
            {a:"天气",h:"wap.weather.com.cn/wap"},
            {a:"解梦",h:"3g.aqioo.com/dream.aspx"}
            ]
        };
        var n17 = { L:
            [
            {a:"淘宝",h:"m.taobao.com"},
            {a:"京东",h:"m.360buy.com"},
            {a:"卓越",h:"www.amazon.cn/gp/aw"},
            {a:"拍拍",h:"m.paipai.com"},            
            {a:"当当",h:"wap.dangdang.com"},
			{a:"凡客",h:"m.vancl.com"},
            {a:"幽默",h:"m.duanqu.com/index!rich"},
            {a:"奇闻",h:"wap.qiwen.cn"},
            {a:"故事",h:"bwap.sez.cc",t:"0"}
            ]
        };
        var n18 = { L:
            [
            {a:"新浪<br/>微博",h:"3g.sina.com.cn/3g/blog"},
            {a:"腾讯<br/>微博",h:"t.3g.qq.com"},
            {a:"搜狐<br/>微博",h:"3g.t.sohu.com"},
            {a:"新浪<br/>微博",h:"t.sina.cn"},
            {a:"51<br/>博客",h:"wap.51.com"},
            {a:"空中<br/>博客",h:"kong.net/blog/wap/wap10/main.jsp"},
            {a:"网易<br/>博客",h:"wapblog.163.com"},
            {a:"QQ<br/>空间",h:"qzone.z.qq.com"},
            {a:"百度<br/>空间",h:"waphi.baidu.com"}
            ]
        };
        var n20 = { L:
            [
            {a:"搜网页",h:"sz.roboo.com/proxy/wml/search.jsp",i:"n20"},
            {a:"搜新闻",h:"news.roboo.com/proxy/news/search.jsp"},
            {a:"搜小说",h:"wap.roboo.com/proxy/novel/search.jsp"},
            {a:"搜音乐",h:"wap.roboo.com/proxy/mp3/search.jsp"},
            {a:"搜图片",h:"theme.roboo.com/proxy/img/search.jsp"},
            {a:"搜软件",h:"wap.roboo.com/proxy/soft/search.jsp"},
            {a:"搜游戏",h:"wap.roboo.com/proxy/game/search.jsp"},
            {a:"搜生活",h:"bendi.roboo.com/yellowpages/index.jsp"},
            {a:"搜视频",h:"wap.roboo.com/proxy/video/search.jsp" }
            ]
        };
         function D() {//设置默认导航信息
            G("N");T(0);
        }
        function G(o) {//将json数据生成映射到html
            var M = eval('(' + o + ')').L;
            for (var i = 0; i < M.length; i++) {
                var m = M[i];
                if (m.t == "1")//如果是1，代表有子分类
                {
                    $("a" + i).innerHTML = "<a href='javascript:void(0);' id='i" + (i + 49) + "' onclick=G('" + m.i + "')  style='color:blue'>"+m.a + "</a>";
                }
                else {//如果是0，代表是终端网址
                    $("a" + i).innerHTML = "<a href='http://" + m.h + "' accesskey='" + (i + 49) + "' id='i" + (i + 49) + "' style='color:black'>"+m.a + "</a>";
                }
            }
        }
        function S()//搜索
        {
            T(1);
            var k = $("k1").value;
            //如果是一键导航，显示n20分类，即搜索导航分类
            if (k== "") {
                G("n20");
            }
            else { //搜索关键词
                $("k1").value = "";
                window.location.href = "http://sz.roboo.com/proxy/wml/search.jsp?wap=%E7%BD%91%E9%A1%B5&q=" + k;
            }
        }
        function H(t) {//帮助中心
           
            $("d2").style.display = t == "1" ? "block" : "none";
            $("d2").innerHTML = t == "1" ? "1.支持快捷键的机型可按对应数字键跳转</br>2.任何建议请发送到邮箱：jpwadh@gmail.com</br><a href='javascript:void(0);' onclick='H(0)'>返回</a>" : "";
            $("tb1").style.display = t == "1" ? "none" : "block";
            t == "1" ?"" : history.go(0);
        }
        function T(t) {//搜索框的控制,t=1代表显示搜索框,t=0代表隐藏搜索框
            $("d1").style.display = t > 0 ? "block" : "none";
            $("k2").style.display = t > 0 ? "none" : "block";
        }
        function $(o) {
            return document.getElementById(o);
        }
    </script>
</head>
<body height="100%">
    <div id="d2">
    </div>
    <table id="tb1">
        <tr>
            <td id="b0" colspan="3" >
            <div id="d1" style="display:none"><input type="text" value="" onclick="if(this.value=='') this.value=''" id="k1" /></div><div id="k2">一键导航</div>
            </td>
        </tr>
        <tr>
            <td id="a0">
            <a href="cy.html" title="常用">常用</a>
            </td>
            <td id="a1">
            <a href="xz.html" title="下载">下载</a>
            </td>
            <td id="a2">
            <a href="wx.html" title="文学">文学</a>
            </td>      
        </tr>
        <tr>
            <td id="a3">
            <a href="yx.html" title="邮箱">邮箱</a>
            </td>
            <td id="a4">
            <a href="xw.html" title="新闻">新闻</a>
            </td>
            <td id="a5">
            <a href="jy.html" title="交友">交友</a>
            </td>
          </tr>
        <tr>
            <td id="a6" >
            <a href="gj.html" title="工具查询">工具<br>查询</a>
            </td>
            <td id="a7">
            <a href="gw.html" title="购物休闲">购物<br>休闲</a>
            </td>
            <td id="a8">
            <a href="kj.html" title="空间微博">空间<br>微博</a>
            </td>
        </tr>	
		<tr id="B">
            <td>
            <a href="javascript:void(0);" accesskey="\2a" onclick="H(1)">帮助</a>
            </td>
            <td>
            <a href="javascript:void(0);" accesskey="0" onclick="S()">搜索</a>
            </td>
            <td>
            <a href="javascript:void(0);" accesskey="\23" onclick="D()">返回</a>
            </td>
        </tr>	
    </table>
</body>
</html>
<!--
处理进度：
1.帮助后返回方式修改，不重新请求页面 【V2.0 已处理】
2.<td id="Td1">  能否替换为一个字母或数字？【待处理】
3.一键导航四个字 能否用变量代替（方便更改，减少冗余）【V2.0 已处理】
4.搜索页面的 默认框内 建议不显示一键导航字样，因为已经不是首页，页面实现也会更简单。【V2.0 已处理】
5.搜索按钮的搜索框按钮已经不需要，见v1.8看下。【V2.0 已处理】
6.#b0{background-color: #E7EEF6;height:10px;}  height属性无效，主要是为了 让banner和 内容有个大小区分 层次感明显些，像pc大多数站点一样。另外也可以节省空间【V2.0 已处理】-->
